﻿package mortal.game.rules
{
    import Message.Public.*;
    import mortal.game.scene3D.player.entity.*;

    public class BossRule extends Object
    {

        public function BossRule()
        {
            return;
        }// end function

        public static function isBossBoss(param1:int) : Boolean
        {
            return param1 == EBossCategory._EBossCategoryBoss || param1 == EBossCategory._EBossCategoryElite || param1 == EBossCategory._EBossCategoryRare;
        }// end function

        public static function isNormalBoss(param1:int) : Boolean
        {
            return param1 == EBossCategory._EBossCategoryNormal;
        }// end function

        public static function isFightBoss(param1:int) : Boolean
        {
            return param1 == EBossType._EBossTypeNomarl || param1 == EBossType._EBossTypeCollect || param1 == EBossType._EBossTypePassageFight || param1 == EBossType._EBossTypeBarrierFight || param1 == EBossType._EBossTypeEscortFight;
        }// end function

        public static function isCollectBoss(param1:MonsterPlayer) : Boolean
        {
            return param1.bossInfo.type == EBossType._EBossTypeCollect || isShareCollectBoss(param1) || isBossGuildTree(param1);
        }// end function

        public static function isShareCollectBoss(param1:MonsterPlayer) : Boolean
        {
            return param1.bossInfo.type == EBossType._EBossTypeShareCollect;
        }// end function

        public static function isBossGuildTree(param1:MonsterPlayer) : Boolean
        {
            return param1.bossInfo.type == EBossType._EBossTypeTree || param1.bossInfo.type == EBossType._EBossTypeSapling;
        }// end function

        public static function isQuestionBoss(param1:int) : Boolean
        {
            return param1 == EBossType._EBossTypeQuestion;
        }// end function

        public static function isPlantBoss(param1:int) : Boolean
        {
            return param1 == EBossType._EBossTypeFlower;
        }// end function

        public static function isMechineBoss(param1:int) : Boolean
        {
            return param1 == EBossType._EBossTypeMachine;
        }// end function

        public static function isDefenceTower(param1:int) : Boolean
        {
            return param1 == EBossType._EBossTypeMachine;
        }// end function

        public static function isTypeBossByEntity(param1:IEntity, param2:int) : Boolean
        {
            var _loc_3:MonsterPlayer = null;
            if (param1 && param1.entityInfo && param1 is MonsterPlayer && !param1.entityInfo.isDead)
            {
                _loc_3 = param1 as MonsterPlayer;
                if (_loc_3 && _loc_3.bossInfo && _loc_3.tboss)
                {
                    return _loc_3.type == param2;
                }
            }
            return false;
        }// end function

        public static function isBossTypeShowName(param1:int) : Boolean
        {
            if (param1 == EBossType._EBossTypeSwitch || param1 == EBossType._EBossTypePassage || param1 == EBossType._EBossTypeBarrier || param1 == EBossType._EBossTypeSkillAssist)
            {
                return false;
            }
            return true;
        }// end function

        public static function isBossTypeShowLife(param1:int) : Boolean
        {
            if (param1 == EBossType._EBossTypeTrap || param1 == EBossType._EBossTypeSwitch || param1 == EBossType._EBossTypeCollect || param1 == EBossType._EBossTypePassage || param1 == EBossType._EBossTypeBarrier || param1 == EBossType._EBossTypeTouch || param1 == EBossType._EBossTypeEscort || param1 == EBossType._EBossTypeQuestion || param1 == EBossType._EBossTypeFlower || param1 == EBossType._EBossTypeSkillAssist || param1 == EBossType._EBossTypePetRobot)
            {
                return false;
            }
            return true;
        }// end function

        public static function isBossTypeCanSelect(param1:int) : Boolean
        {
            if (param1 == EBossType._EBossTypeTrap || param1 == EBossType._EBossTypeSwitch || param1 == EBossType._EBossTypePassage || param1 == EBossType._EBossTypeBarrier || param1 == EBossType._EBossTypeTouch || param1 == EBossType._EBossTypeEscort || param1 == EBossType._EBossTypeSkillAssist || param1 == EBossType._EBossTypePetRobot)
            {
                return false;
            }
            return true;
        }// end function

    }
}
